package com.medata.service.impl;

import com.medata.dataObject.Oailockip;
import com.medata.repository.OailockipRepository;
import com.medata.service.OailockipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

/**
 * @author ：zb
 * @date ：Created in 2019/7/16 0016 9:14
 * @description：
 */
@Service
public class OailockipServiceImpl implements OailockipService {
    @Autowired
    private OailockipRepository repository;

    @Override
    public Page<Oailockip> findAll(Pageable pageable) {
        return repository.findAll(pageable);
    }

    @Override
    @Transactional
    public void deleteByIpid(Integer ipid) {
        repository.deleteByIpid(ipid);
    }

    @Override
    public void saveOrUpdate(Oailockip oailockip) {
        repository.save(oailockip);
    }
}
